package com.chain.chl.model;

import com.chain.chl.model.card.Card;
import com.google.gson.Gson;

/**
 * Created by baoyunfeng on 2018/6/9.
 */

public class AddFavoriteModel {

    public static String newsType = "news";

    private String extraContent;
    private String contentId;
    private String favoriteType = newsType;

    public static String getNewsType() {
        return newsType;
    }

    public static void setNewsType(String newsType) {
        AddFavoriteModel.newsType = newsType;
    }

    public String getExtraContent() {
        return extraContent;
    }

    public void setCardExtraContent(Card card) {
        Gson gson = new Gson();
        this.extraContent = gson.toJson(card);
    }

    public void setExtraContent(String extraContent) {
        this.extraContent = extraContent;
    }

    public Card getExtraCardContent(){
        Gson gson = new Gson();
        return gson.fromJson(extraContent,Card.class);
    }

    public String getContentId() {
        return contentId;
    }

    public void setContentId(String contentId) {
        this.contentId = contentId;
    }

    public String getFavoriteType() {
        return favoriteType;
    }

    public void setFavoriteType(String favoriteType) {
        this.favoriteType = favoriteType;
    }
}
